home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Know Your Baseball - The Greatest Player Resource
/
Know Your Baseball - Greatest Player.iso
/
Baseball
/
Director
/
SHARED.CST
/
00009_Script_MenuObject
< prev
next >
Wrap
Text File
|
1998-09-21
|
11KB
|
443 lines
property ScrnHelp,MenuFunctions,Sound1,Sound2,Sound3,¼
VideoCues,ThisHand,VideoDetails
on Birth Me
set ScrnHelp = []
set MenuFunctions = []
set Sound1 = []
set Sound2 = []
set Sound3 = []
set VideoCues = []
set ButtStatus = []
set ThisHand = []
set VideoDetails = []
return me
end
on SetMenuFunctions me
set x = the number of lines in (field "MenuItems")
repeat with Y = 1 to X
append (MenuFunctions, word 2 of Line Y of field "MenuItems")
end repeat
return Menufunctions
end
-- Load special functions for KTG
on mLoadKTGD me,Scrn
repeat with Y = 10 to 22 setAt list, position, value
setat (MenuFunctions,y,"ShowinfoD")
end repeat
return Menufunctions
end
on mLoadKTGO me,Scrn
repeat with Y = 10 to 22 setAt list, position, value
setat (MenuFunctions,y,"ShowinfoO")
end repeat
return Menufunctions
end
on mLoadKTGC me,Scrn
repeat with Y = 10 to 22 setAt list, position, value
setat (MenuFunctions,y,"ShowinfoC")
end repeat
return Menufunctions
end
-- load the screen prompts from cast member ScreenPrompts in each movie--
on NewIndicators me
set ScrnHelp = []
set p = Empty
repeat with x = 1 to 48
set pos = line x of field "ScreenPrompts"
set w = the number of words in pos
repeat with c = 2 to w
put word c of pos & " " into word C-1 of p
end repeat
append (ScrnHelp, p)
set p = Empty
end repeat
return Prompts
end
--- variations of indicators for KTG movies where offense defence change
on mOffndicators me
set ScrnHelp = []
set p = Empty
repeat with x = 1 to 48
set pos = line x of field "ScreenPrompts3"
set w = the number of words in pos
repeat with c = 2 to w
put word c of pos & " " into word C-1 of p
end repeat
append (ScrnHelp, p)
set p = Empty
end repeat
return Prompts
end
on mCenIndicators me
set ScrnHelp = []
set p = Empty
repeat with x = 1 to 48
set pos = line x of field "ScreenPrompts2"
set w = the number of words in pos
repeat with c = 2 to w
put word c of pos & " " into word C-1 of p
end repeat
append (ScrnHelp, p)
set p = Empty
end repeat
return Prompts
end
--- called from SSQ movies only to set the cards needed
-- load the card names from cast member cards in each SSQ movie--
on DealTheCards me
set ThisHand = []
set p = Empty
repeat with x = 1 to 48
set pos = line x of field "Cards"
set w = the number of words in pos
repeat with c = 2 to w
put word c of pos & " " into word C-1 of p
end repeat
setat( ThisHand,X, p)
set p = Empty
end repeat
end
-- SetTheCues sets the cues for the video clips in SSQ movies
-- called from an SSQ start movie
on mSetTheCues me
-- load the cue points from cast member clips in each movie--
repeat with x = 1 to 48
set p = Empty
set pos = line x of field "clips"
set w = the number of words in pos
repeat with c = 2 to w
put word c of pos & " " into word C-1 of p
end repeat
setAt(VideoCues,x, p)
set p = Empty
end repeat
end
-- load the sound file namess from cast members Sounds1 Sounds2 Sounds3 in each movie--
on mloadSoundNames me
-- for first card
set p = Empty
repeat with x = 1 to 48
set snd= line x of field "Sounds1"
set w = the number of words in snd
repeat with c = 2 to w
put word c of snd & " " into word C-1 of p
end repeat
append(Sound1, p)
set p = Empty
end repeat
--for second card
repeat with z = 1 to 48
set snd= line z of field "Sounds2"
set w = the number of words in snd
repeat with c = 2 to w
put word c of snd & " " into word C-1 of p
end repeat
append(Sound2, p)
set p = Empty
end repeat
--for third card
repeat with Q = 1 to 48
set snd= line Q of field "Sounds3"
set w = the number of words in snd
repeat with c = 2 to w
put word c of snd & " " into word C-1 of p
end repeat
append(Sound3, p)
set p = Empty
end repeat
end
-- KTG opening menu -- the other know the game screen use the SSQ script to load 3 sets
-- load the sound file names from cast members Sounds
on mloadSoundNamesKTG me
set p = Empty
repeat with x = 1 to 48
set snd= line x of field "Sounds1"
set w = the number of words in snd
repeat with c = 2 to w
put word c of snd & " " into word C-1 of p
end repeat
append(Sound1, p)
set p = Empty
end repeat
-- ------- get a specifc list or item a list or set an item in a list from MenuObject ------------
on De me -- temp script for testing loading of lists remove before release
beep
-- put ScrnHelp
-- put MenuFunctions
-- put sound1
put VideoCues
-- put ButtStatus
-- put ThisHand
-- put CardStatusFlags
put sound1
-- put VideoCues
put VideoDetails
end
-- changes card list to bit mapped text list for marker 1Video in SSQ movies
on MsetSecondaryCards me, Player,List
set ThisHand = []
-- set txt prompts for players
set p = Empty
repeat with x = 1 to 48
set txt = line x of field "BitMapTXT"
set w = the number of words in txt
repeat with c = 2 to w
put word c of txt & " " into word C-1 of p
end repeat
append(ThisHand, p)
set p = Empty
end repeat
-- set txt prompts for video marker where card 2 has been selected
if List = 2 then
set txt = line player of field "BitMap2"
set w = the number of words in txt
repeat with c = 2 to w
put word c of txt & " " into word C-1 of p
end repeat
setat(ThisHand,player, p)
set p = empty
end if
if List = 3 then
set txt = line player of field "BitMap3"
set w = the number of words in txt
repeat with c = 2 to w
put word c of txt & " " into word C-1 of p
end repeat
setat(ThisHand,player, p)
set p = empty
end if
end
--- while in VideoMarker reset cards to default after viewing video for detail card
on mResetCard me, player
set txt = line player of field "BitMapTXT"
set w = the number of words in txt
repeat with c = 2 to w
put word c of txt & " " into word C-1 of p
end repeat
setat(ThisHand,player, p)
set p = empty
end
-- for KTG toggle of hid all showall prompt
on mAllprompt me, status
if status <1 then setat (ScrnHelp,25,"Hide All")
if status = 1 then setat (ScrnHelp,25,"Show All")
updatestage
end
-- reset the functions in home for calls to dilbert
on MsetDilbert me
set p = Empty
repeat with x = 23 to 48
set txt = line x of field "Dilbert"
put word 2 of txt into p
setAt (Menufunctions, x, p)
end repeat
set p = Empty
end
-- resets the home menu back after returning from the dilbert screen
on MsetHomeMenu me
set p = Empty
repeat with x = 23 to 48
set txt = line x of field "RedFlag"
put word 2 of txt into p
setAt (Menufunctions, x, p)
end repeat
set p = Empty
end
-- changes specific scripts associated with sprite changes
on mSetCommand me,Which, Action
set C = getAt(MenuFunctions, which)
put Action into C
setat MenuFunctions,which, c
end
-- get help prompt
on mFunction me, Which
return getat(ScrnHelp,which)
end
-- get command to be performed
on Mdo me, which
return getAt(MenuFunctions, which)
end
-- for SSQ movies find a card or cards to display
on mCards me, Which
if which > EMPTY then
return getAt(ThisHand, which)
end if
end
-- turns button function on for multiple cards
on mMultiOn me
setat MenuFunctions,11, "CardButton"
end
-- turns button function on for multiple cards
on mMultiOff me
setat MenuFunctions,11, EMPTY
end
-- finds and plays video segments in SSQ movies
on mVideoSegment me,Which,Multi
global gClipIn,gClipout,gBt,crdflag1
if the framelabel = "1Video" then set multi = (crdflag1)
if Which > 0 then
set temp = getat(VideoCues, which )
set vT = word 1 of temp
set gClipOut =( the duration of cast vT)-24
set gClipIn = 0
return vT
set gClipIn = 0
if gBT <1 then
exit
end if
end if
end
--- special loadvideo for details on video screen
on mDetailvideo me,theOne
global gClipOut, gPos, gplayerFlag
puppetsprite 3 ,true
set the type of sprite 3 = 16
if theOne > 0 then
set the castnum of sprite 3 =the number of cast ( theOne)
set the loch of sprite 3 = 155
set the locv of sprite 3 = 150
updatestage
set gClipOut = the duration of cast theOne-24
set the movierate of sprite 3 = 1
end if
end
on mSoundPlayBack me, Which, Snd,LstNum
if LstNum = 1 then set x =getat(Sound1,which)
if LstNum = 2 then set x =getat(Sound2,which)
if LstNum = 3 then set x =getat(Sound3,which)
put word value(Snd) of x & " SoundFile" -- remove later
if X > EMPTY then puppetSound (word Snd of x)
updatestage
end
on mGetBeyondSound me, which
set x = getat(Sound1,which)
if x > EMPTY then return x
end
-- Gets flags for SSQ detail cards
on mGetCardStatus which
set Stat = getat(CardStatus,which)
return Stat
end
-- sets detail card flags
on mSetCardStatus which,Status
Setat(CardStatus,which,Status)
end
---------- added function to allow the control of details from the video screen -----------
---- i had to do it this way because the orginal script used the same list for details cards on
--- screen 1 and text details on screen two
--- I did not want to have to rewrite all control scripts so I opted to create a new list to keep track of
-- which players a card details
--- remembers which players have detail cards called from setinits in each SSq movie after setcards
on MPlayerDetails me
repeat with x = 1 to 48
set cards = getAt(ThisHand, x)
set num = the number of words in cards
setat(VideoDetails,x,num)
end repeat
end
--- get the number of details for a player -- for video screen
on MgetPlayerDetails me, which
set num =getat(VideoDetails,which)
return num
end
--- gets the list of videos for the current player
on MgetPossibleVideos me, which
set temp = getat(VideoCues,which)
set max = the number of words in temp
set videos = [ ]
repeat with x = 1 to max
append(videos, word x of temp)
end repeat
return videos
end